package com.gk.panda.apis.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gk.panda.apis.dto.BiologyPointSaveDto;
import com.gk.panda.apis.dto.BiologyPointSearchDto;
import com.gk.panda.apis.dto.BiologyPointSortDto;
import com.gk.panda.pojo.BiologyPoint;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

public interface BiologyPointService extends IService<BiologyPoint> {

    /**
     * 添加动植物点位
     * @param dto
     * @return
     */
    boolean addBiologyPoint(BiologyPointSaveDto dto);

    /**
     * 分页查询动植物点位（包括geoJson数据）
     * @param dto
     * @return
     */
    Page<BiologyPoint> getBiologyPointList(BiologyPointSearchDto dto);

    /**
     * 根据id查询动植物点位详情
     * @param id
     * @return
     */
    BiologyPoint getBiologyPointDetails(Integer id);

    /**
     * 修改动植物点位
     * @param dto
     * @return
     */
    boolean updateBP(BiologyPointSaveDto dto);

    /**
     * 下载动植物导入模板
     *
     * @param response P
     */
    void downloadTemplate(HttpServletResponse response);

    /**
     * 批量导入动植物信息
     *
     * @param file P
     * @return R
     */
    String importBiology(MultipartFile file);

    /**
     * 批量导出动植物信息
     *
     * @param response P
     */
    void exportBiology(HttpServletResponse response);

    /**
     * 更新后台排序
     * @param dto
     */
    void updateSort(BiologyPointSortDto dto);

    /**
     * 大屏获取动植物点位列表
     * @param dto
     * @return
     */
    List<BiologyPoint> getBioPointListForLS(BiologyPointSearchDto dto);
}
